package com.fsh.anime.controller;

import com.fsh.anime.model.vos.Result;
import com.fsh.anime.service.HomeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("/api/home")
public class HomeController {
    @Autowired
    private HomeService homeService;

    /**
     * 所有年加起来，按季度分组 ，每季度番剧总数
     *
     * @return {@link Result}
     */
    @GetMapping("/AllSeasonTotal")
    public Result AllSeasonTotal(){
        return homeService.AllSeasonTotal();
    }

    /**
     * 各年总
     *
     * @return {@link Result}
     */
    @GetMapping("/AllYearTotal")
    public Result AllYearTotal(){
        return homeService.AllYearTotal();
    }


}
